package com.it.entity;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * 角色表，决定用户可以访问的页面（用户-患者，管理员，医生）
 */
@Data
@TableName("gm_role")
public class Role implements Serializable {
    @TableId(value = "id", type = IdType.UUID)
    private String id;
    /**
     * 角色
     */
    private String role;
    /**
     * 角色描述
     */
    private String description;
    /**
     * 创建人
     */
    private String createName;
    /**
     * 角色中的权限
     */
    @TableField(exist = false)
    private List<Permission> permissions;
    @TableField(exist = false)
    private String permissionsIds;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getCreateName() {
        return createName;
    }

    public void setCreateName(String createName) {
        this.createName = createName;
    }

    public List<Permission> getPermissions() {
        return permissions;
    }

    public void setPermissions(List<Permission> permissions) {
        this.permissions = permissions;
    }

    public String getPermissionsIds() {
        return permissionsIds;
    }

    public void setPermissionsIds(String permissionsIds) {
        this.permissionsIds = permissionsIds;
    }
}
